Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Cronjobs are tricky to install if Python script is executed. Note that it will be "root" that runs the command. Be careful about PYTHONPATH. The following Cronjob entry was tested ok.

    Code Block
    languagebash
    *0 8 * * * cd /data/sim_atlas/upload && PYTHONPATH=/home/rccuser/.local/lib/python3.6/site-packages /usr/bin/python add_video.py


  2. Logs: The output from add_videos.py is simatlas_manager.log (in the same directory as add_videos.py)

    Code Block
    2019-12-11 13:08:18,458: DEBUG: Uploading Pahaua
    2019-12-11 13:08:35,069: DEBUG: out:Uploading file...
    Success: https://www.youtube.com/watch?v=VOHSx8tqovo
    
    2019-12-11 13:08:35,069: DEBUG: err:
    2019-12-11 13:08:35,070: DEBUG: Pahaua: ['Success: https://www.youtube.com/watch?v=VOHSx8tqovo', '']
    2019-12-11 13:08:35,070: DEBUG: Success: Pahaua uploaded: https://www.youtube.com/watch?v=VOHSx8tqovo
    ...
    2019-12-11 13:08:36,342: DEBUG: Updated: faultname=Pahaua video=https://www.youtube.com/watch?v=VOHSx8tqovo(G313) version=1(H313)
    2019-12-11 13:09:06,868: DEBUG: Remotely updated SimAtlas DB: DB update success





...