Guest User

Untitled

a guest
Jul 31st, 2018
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 3.72 KB | None | 0 0
  1. templates:
  2.   global:
  3.     free_space:
  4.       path: /media/md5/superchicken
  5.       space: 28610
  6.  
  7. irc:
  8.   TorrentLeech:
  9.     tracker_file: '~/TorrentLeech.tracker'
  10.     nickname: 'x'
  11.     port: 7021
  12.     use_ssl: yes
  13.     rsskey: 'x'
  14.     channels: ["#tlannounces"]
  15.     task: download_to_ram
  16.     task_delay: 5
  17.   IPTorrents:
  18.     tracker_file: '~/IPTorrents.tracker'
  19.     nickname: 'x'
  20.     port: 6697
  21.     use_ssl: yes
  22.     passkey: 'x'
  23.     channels: ["#ipt.announce"]
  24.     task: download_to_ram
  25.     task_delay: 0
  26.  
  27. tasks:
  28.   download_to_ram:
  29.     manual: yes
  30.     disable:
  31.      - backlog
  32.     accept_all: yes
  33.     free_space:
  34.       path: /dev/shm/datafast
  35.       space: 28610
  36.     content_size:
  37.       min: 300
  38.       max: 6000
  39.     max_reruns: 0
  40.     retry_failed:
  41.       max_retries: 0
  42.     deluge:
  43.       port: 52594
  44.       label: 'buffer'
  45.  
  46.   check_ram_free:
  47.     disable:
  48.      - builtins
  49.       - seen
  50.       - seen_info_hash
  51.       - cached
  52.     exec:
  53.       on_start:
  54.         phase:
  55.          - df --output=avail,file --block-size=GB /dev/shm/datafast/ | sed 1d | sed 's/^ *//' > /dev/shm/datafast/avail.space
  56.       on_input:
  57.         for_entries: echo {{title}}GB free {{url}}
  58.     text:
  59.       url: "/dev/shm/datafast/avail.space"
  60.       entry:
  61.         title: (^\d*)
  62.         url: \s+(.*$)
  63.     if:
  64.       - "title|int < 35": accept
  65.     run_task:
  66.       when: accepted
  67.       task: remove_from_ram
  68.  
  69.   remove_from_ram:
  70.     disable:
  71.      - backlog
  72.       - seen
  73.       - seen_info_hash
  74.     from_deluge:
  75.       port: 52594
  76.       keys:
  77.        - total_payload_upload
  78.         - total_payload_download
  79.     exec:
  80.       on_start:
  81.         phase: echo "remove from ram started"
  82.       on_filter:
  83.         for_entries: echo "avg_up={{avg_upload_rate}}  {{title}}"
  84.     set:
  85.       location: "{{ deluge_path ~ title}}"
  86.       avg_upload_rate: "{{ (total_payload_upload - total_payload_download) / deluge_seed_time}}"
  87.     if:
  88.       - "deluge_label == 'buffer'": accept
  89.     sort_by_weight:
  90.       - field: avg_upload_rate
  91.         weight: 100
  92.         inverse: yes
  93.       - field: deluge_ratio
  94.         weight: 200
  95.         upper_limit: 5
  96.     limit_new: 5
  97.     deluge:
  98.       port: 52594
  99.       ratio: 0
  100.       removeatratio: yes
  101.     delete:
  102.       allow_dir: yes
  103.  
  104.   move_ram_to_disk:
  105.     manual: yes
  106.     disable:
  107.      - backlog
  108.       - seen
  109.       - seen_info_hash
  110.     from_deluge:
  111.       port: 52594
  112.       keys:
  113.        - active_time
  114.         - upload_payload_rate
  115.         - total_uploaded
  116.     if:
  117.       - "deluge_ratio > 1.5 and 'datafast' in deluge_path and deluge_seed_time > 2": accept
  118.     sort_by_weight:
  119.       - field: active_time
  120.         weight: 100
  121.         upper_limit: 12
  122.       - field: content_size
  123.         weight: 80
  124.       - field: upload_payload_rate
  125.         weight: 200
  126.         inverse: yes
  127.     limit_new: 5
  128.     deluge:
  129.       port: 52594
  130.       path: /media/md5/superchicken/private/deluge/data
  131.  
  132.   remove_from_disk:
  133.     manual: yes
  134.     disable:
  135.      - backlog
  136.       - seen
  137.       - seen_info_hash
  138.     from_deluge:
  139.       port: 52594
  140.       keys:
  141.        - total_payload_upload
  142.         - total_payload_download
  143.     set:
  144.       location: "{{ deluge_path ~ '/' ~ title}}"
  145.       avg_upload_rate: "{{ (total_payload_upload - total_payload_download) / deluge_seed_time}}"
  146.     if:
  147.       - "deluge_path=='/media/md7/superchicken/private/deluge/data' and deluge_label !='keep'": accept
  148.     sort_by_weight:
  149.       - field: avg_upload_rate
  150.         weight: 100
  151.         inverse: yes
  152.       - field: content_size
  153.         weight: 20
  154.     limit_new: 2
  155.     deluge:
  156.       port: 52594
  157.       ratio: 0
  158.       removeatratio: yes
  159.     delete:
  160.       allow_dir: yes
  161.  
  162.  
  163. schedules:
  164.   - tasks: [check_ram_free]
  165.     interval:
  166.       minutes: 1
Advertisement
Add Comment
Please, Sign In to add comment