Skip to content

Instantly share code, notes, and snippets.

Avatar

Rick Broker zvercodebender

View GitHub Profile
@zvercodebender
zvercodebender / TaskMonitorCleanup.py
Last active Oct 30, 2015
A small XL Deploy CLI script to clean up and archive tasks
View TaskMonitorCleanup.py
import com.xebialabs.deployit.engine.api.execution.TaskExecutionState as TaskExecutionState
taskList = task2.getAllCurrentTasks()
for task in taskList:
if task.state == TaskExecutionState.EXECUTED :
print "Archive : %s %s %s %s" % ( task.id, task.description, task.owner, task.state )
task2.archive( task.id )
elif task.state == TaskExecutionState.FAILED :
print "Canceling: %s %s %s %s" % ( task.id, task.description, task.owner, task.state )
View ServerService.py
import httplib, urllib
import base64
import re
class ServerService:
def __init__(self):
communicatorField = deployit.getClass().getDeclaredField("communicator")
communicatorField.setAccessible(True)
communicator = communicatorField.get(deployit.delegate)