Hi
flask_app.py
from flask import Flask
from flask import render_template
import sched, time,thread
import tweet
sc = sched.scheduler(time.time, time.sleep)
app = Flask(__name__)
@app.route('/')
def hello_world():
return render_template('index.html')
@app.route('/tweeter')
def tweeter():
def do_something():
tweet.tweetIt()
sc.enter(20, 1, do_something,())
sc.run()
thread.start_new_thread(do_something,())
return "tweeted everything"
The above code is my flask_app.py. As you can see I am using threading in the code.The code works just fine in localhost.But I am having trouble With that thread on your server.I think the problem may be because of your uWSGi protocol or the server,that is serving our flask app.Please let me know the errors in the app as soon as you can.