publishers_23.py 384 B

1234567891011
  1. def publish_file(args, pub_name, meta):
  2. """ This task will process file downloaded via FileMonitor """
  3. pub = models.Publisher.objects.get(name=pub_name)
  4. full_path, monitor_id = args
  5. if full_path:
  6. monitor = models.FileMonitor.objects.get(id=monitor_id)
  7. upload = move_upload(pub, full_path, monitor.name, meta)
  8. run_pub_scripts(pub, upload)