Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change entrypoint of TW process to simple binary script #8540

Closed
novicecpp opened this issue Jul 4, 2024 · 0 comments · Fixed by #8541
Closed

Change entrypoint of TW process to simple binary script #8540

novicecpp opened this issue Jul 4, 2024 · 0 comments · Fixed by #8541
Assignees
Labels

Comments

@novicecpp
Copy link
Contributor

novicecpp commented Jul 4, 2024

Currently we execute MasterWorker.py directly to start TW process.

if [[ "$DEBUG" = 'true' ]]; then
APP_DIR="${APP_DIR:-/data/repos/CRABServer/src/python}"
python3 -m pdb "${APP_DIR}"/TaskWorker/SequentialWorker.py "${CONFIG}" --logDebug
else
APP_DIR=/data/srv/current/lib/python/site-packages
python3 "${APP_DIR}"/TaskWorker/MasterWorker.py --config "${CONFIG}" --logDebug &
fi
}

To test change of MasterWorker.py itself, you need to copy-paste new version of this file to installation path every time, it does not work with ./start.sh -g because script always point to installation path.

To fix this, create simple entrypoint script and import the __main__ section from MasterWorker.py instead.
The same way we do with Rucio ASO,

from ASO.Rucio.Main import main
if __name__ == "__main__":
main()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant