- cmd = f'{rsync} {bundle.code_file} {username}@{machine}:{bundle.code_file}'
- logger.debug(f"Copying work to {worker} via {cmd}")
- exec_utils.run_silently(cmd)
-
- # Before we do more work, make sure it's still viable.
- if self.check_if_cancelled(bundle):
- return self.post_launch_work(bundle)
-
- # Fucking Apple has a python3 binary in /usr/sbin that is not
- # the one we want and is protected by the OS so make sure that
- # /usr/local/bin is early in the path.
- cmd = (f'{ssh} {bundle.username}@{bundle.machine} '
- f'"export PATH=/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/home/scott/bin:/home/scott/.local/bin; /home/scott/lib/python_modules/remote_worker.py'
+ cmd = f'{RSYNC} {bundle.code_file} {username}@{machine}:{bundle.code_file}'
+ logger.info(f"Copying work to {worker} via {cmd}")
+ run_silently(cmd)
+
+ # Do it.
+ cmd = (f'{SSH} {bundle.username}@{bundle.machine} '
+ f'"source remote-execution/bin/activate &&'
+ f' /home/scott/lib/python_modules/remote_worker.py'