Skip to content

Instantly share code, notes, and snippets.

View nsoranzo's full-sized avatar
💭
🦅 👀

Nicola Soranzo nsoranzo

💭
🦅 👀
View GitHub Profile
@nsoranzo
nsoranzo / merge_users.py
Last active January 28, 2021 18:33
Script to merge 2 Galaxy users
#!/usr/bin/env python
import argparse
import os
import shlex
import subprocess
import sys
scripts_dir = os.path.dirname(__file__)
sys.path.insert(1, os.path.join(scripts_dir, os.pardir, 'lib'))
@nsoranzo
nsoranzo / gist:571537939ddbb140192e290fa6ec3358
Created August 18, 2017 16:24
Build nginx rpm for Galaxy
$ sudo yum install -y GeoIP-devel gcc gd-devel gperftools-devel libxslt-devel openssl-devel pcre-devel perl-devel perl-ExtUtils-Embed rpm-build zlib-devel
$ mkdir -p ~/software
$ cd ~/software/
[software]$ git clone --branch 2.2 https://github.com/vkholodkov/nginx-upload-module
# Download latest source RPM from EPEL repository https://apps.fedoraproject.org/packages/nginx/
[software]$ wget https://dl.fedoraproject.org/pub/epel/7/SRPMS/n/nginx-1.10.2-1.el7.src.rpm
[software]$ rm -rf ~/rpmbuild/
[software]$ mkdir ~/rpmbuild
[software]$ rpm -i nginx-1.10.2-1.el7.src.rpm
[software]$ cd ~/rpmbuild/
@nsoranzo
nsoranzo / gist:c4856ad947ff2eaf6d43e3e471584312
Created February 3, 2017 19:56
Stop the scheduling of a Galaxy workflow invocation
If a handler log is full of messages like:
Workflow step 1585 of invocation 554 delayed
then probably a workflow invocation is stuck because a step was cancelled by a user. After verifying that this is the case, to stop the workflow invocation scheduling connect to the Galaxy database using psql and do the following:
galaxy_db=> SELECT * FROM workflow_invocation WHERE id=554;
id | create_time | update_time | workflow_id | history_id | state | scheduler | handler | uuid
-----+----------------------------+----------------------------+-------------+------------+-------+-----------+----------+----------------------------------
554 | 2016-11-16 17:24:38.586902 | 2016-11-16 17:26:34.555872 | 201 | 485 | ready | core | handler1 | 8d49678eac2111e697b90050569af9e3