Merge branch 'saas' into saas-dev

This commit is contained in:
Albert Santoni 2015-05-19 12:18:54 -04:00
commit 1c88d6dccd
2 changed files with 10 additions and 15 deletions

View File

@ -3,12 +3,11 @@
font-size: 200px !important;
}
</style>
<?php $upgradeLink = Application_Common_OsPath::getBaseDir() . "billing/upgrade"; ?>
<?php if ($this->quotaLimitReached) { ?>
<div class="errors quota-reached">
Disk quota exceeded. You cannot upload files until you
<a target="_parent" href=<?php $baseUrl = Application_Common_OsPath::getBaseDir(); echo $baseUrl . "billing/upgrade"?>>
upgrade your storage
</a>.
<?php printf(_pro("Disk quota exceeded. You cannot upload files until you %s upgrade your storage"),
"<a target=\"_parent\" href=$upgradeLink>");?></a>.
</div>
<?php
}

View File

@ -3,12 +3,8 @@ import json
import logging
import collections
import Queue
import subprocess
import multiprocessing
import time
import sys
import traceback
import os
import pickle
import threading
from urlparse import urlparse
@ -158,23 +154,23 @@ class StatusReporter():
''' We use multiprocessing.Process again here because we need a thread for this stuff
anyways, and Python gives us process isolation for free (crash safety).
'''
_ipc_queue = multiprocessing.Queue()
#_request_process = multiprocessing.Process(target=process_http_requests,
_ipc_queue = Queue.Queue()
#_http_thread = multiprocessing.Process(target=process_http_requests,
# args=(_ipc_queue,))
_request_process = None
_http_thread = None
@classmethod
def start_thread(self, http_retry_queue_path):
StatusReporter._request_process = threading.Thread(target=process_http_requests,
StatusReporter._http_thread = threading.Thread(target=process_http_requests,
args=(StatusReporter._ipc_queue,http_retry_queue_path))
StatusReporter._request_process.start()
StatusReporter._http_thread.start()
@classmethod
def stop_thread(self):
logging.info("Terminating status_reporter process")
#StatusReporter._request_process.terminate() # Triggers SIGTERM on the child process
#StatusReporter._http_thread.terminate() # Triggers SIGTERM on the child process
StatusReporter._ipc_queue.put("shutdown") # Special trigger
StatusReporter._request_process.join()
StatusReporter._http_thread.join()
@classmethod
def _send_http_request(self, request):