Questions tagged [twistd]

`twistd` is an utility that can be used to run twisted applications. It's shipped with `twisted` itself and it automatically takes care for you of logging, daemonizing, permissions and more; while still allowing you to configure all of these. Use this tag for questions about usage and problems with twistd command, pay attention to the difference between `twistd` and `twisted` and DO NOT use this tag for general twisted-related questions.

53 questions
0
votes
2 answers

Generic approach to deferred all?

I need something in twistd similar to JS' Promise.all(). I found this FireWhenAllFinish example, but it is buggy (throws exceptions, maybe outdated). This is not really a question, cause I found a solution, see below. Still posting it here so it…
kev
  • 8,928
  • 14
  • 61
  • 103
0
votes
1 answer

Correct use of API with threading in daemonized twisted

I'm using a service whose API uses threading.Thread and I want to use Deferreds inside it. If I run it like a standard python module I don't have any problem. Something like: from twisted.internet import reactor from outside import…
0
votes
1 answer

Twistd Plugin not found after Debian upgrade

After I upgraded from debian jessie to stretch, twistd does not find my plugin anymore. I could not find what's wrong. I guess I need to specify some path now which wasn't neccessary before or similar. I get the error /usr/bin/twistd: Unknown…
allo
  • 3,955
  • 8
  • 40
  • 71
0
votes
1 answer

How to disable HTTP Basic Auth for specific API endpoints on Twisted-Klein server

I have simple Twisted-Klein server, with HTTP Basic Auth enabled globally: from klein import Klein import attr from zope.interface import implementer from twisted.cred.portal import IRealm from twisted.internet.defer import succeed from…
rsrx
  • 1,433
  • 1
  • 13
  • 25
0
votes
1 answer

Can I set the twistd pid filename inside the tac configuration file?

I can set the filename of the .pid file by supplying the --pidfile= option to twistd. Is there a way I can specify it inside a .tac file instead? Context: My twisted service is a bot that plays a game and accepts multiple parameters like his name,…
LeartS
  • 2,866
  • 2
  • 25
  • 45
0
votes
2 answers

using twistd to run a twisted application but script run twice

sample code here # main.py from twisted.application import service, internet application = service.Application("x") service.IProcess(application).processName = "x" print "some log...." if I run this main.py with: twistd -y main.py I got 2 "some…
holsety
  • 323
  • 1
  • 2
  • 13
0
votes
6 answers

How do I auto-launch a custom webserver on BeagleBone Black?

I'd like my BeagleBone Black to start up and start web-serving with a custom web server, without the need to log in and configure/launch/change anything. I suppose this question is two-fold: How do I remove all of the default, redundant, or…
Dave
  • 2,653
  • 4
  • 20
  • 22
0
votes
1 answer

fabric don't start twisted application as a daemon

I have written a simple automation script for deploying and restarting my twisted application on remote Debian host. But I have an issue with starting using twistd. I have a run.tac file and start my application as follows inside fabric…
pss
  • 736
  • 3
  • 7
  • 14
1 2 3
4